/*
 * protocol.h
 *
 *  Created on: 10.12.2012
 *      Author: Michael
 */

#ifndef PROTOCOL_H_
#define PROTOCOL_H_

#define FRAMESTART1			'A'
#define FRAMESTART2			'S'
#define FRAMESTART3			'T'
#define FRAMESTART4			'R'
#define HEADSEPERATOR                   ':'
#define VALSEPERATOR                    ','
#define FRAMEEND			'!'

/*
 * SAMPLE FRAME
 *
 * A_S_T_R_O_0_19_TELEMETRY_:_VAL1_,_VAL2_!_
 */

enum msgTypes{
        TELEMETRY = 0,
        PAYLOAD,
        SET_PWM,
        SET_PID_ANGLE,
        SET_PID_VEL,
        GET_PID_ANGLE,
        GET_PID_VEL,
        SET_KALMAN,
        GET_KALMAN,
        NONE,
        TURN_W_VELOCITY,
        TAKE_PICTURE_AT,
        SNAPSHOT,
        GET_SMC_ANGLE,
        SET_SMC_ANGLE,
        GET_SMC_VEL,
        SET_SMC_VEL,
        TURN_W_VELOCITY_SMC,
        TAKE_PICTURE_AT_SMC,
        SAT_RESET
};

enum telemetry{
    ANGLE_KAL = 0,
    ANGLE_GYRO,
    ANGLE_MAG,
    DES_ANGLE,//VEL_KAL,
    VEL_GYRO,
    DES_VEL, //VEL_MAG,
    TEMP,
    BATTERY,
    PA,
    IA,
    DA,
    PV,
    IV,
    DV,
    DC,
    TELEMETRY_CNT // has to be last value
};


#endif /* PROTOCOL_H_ */
